<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

namespace Database\Seeders;

use App\Enums\CheckStatusEnum;
use App\Models\CheckUserProfile;
use App\Models\Company;
use App\Models\House;
use App\Models\HouserScore;
use App\Models\PassCard;
use App\Models\SearchNotice;
use App\Models\User;
use App\Models\UserProfile;
use Illuminate\Database\Seeder;

class CheckSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run()
    {
        for ($i = 0; $i < 1; ++$i) {
            $user = User::factory()->create([
                'identity' => 1,
            ]);
            CheckUserProfile::factory()->create([
                'user_id' => $user->id,
                'check_status' => CheckStatusEnum::CHECK_ING,
                'identity' => 1,
            ]);
            UserProfile::factory()->create([
                'user_id' => $user->id,
                'check_status' => CheckStatusEnum::NOT_FILL,
                'identity' => 1,
            ]);
            SearchNotice::factory()->create([
                'user_id' => $user->id,
                'check_status' => CheckStatusEnum::CHECK_ING,
            ]);
            PassCard::factory()->create([
                'user_id' => $user->id,
                'check_status' => CheckStatusEnum::CHECK_ING,
            ]);
            $house = House::factory()->create([
                'houser_user_id' => $user->id,
                'check_status' => CheckStatusEnum::CHECK_ING,
            ]);
            Company::factory()->create([
                'register_user_id' => $user->id,
                'check_status' => CheckStatusEnum::CHECK_ING,
            ]);
            HouserScore::factory()->create([
                'user_id' => $user->id,
                'house_id' => $house->id,
            ]);
        }
    }
}
